﻿<%@page contentType="text/html" pageEncoding="utf-8"%>
<%@ page import="java.util.*" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>奋青网-社团列表</title>
<link href="css/Main.css" rel="stylesheet" type="text/css" />
<link href="css/ClubList.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/Jquery-1-5-2.js"></script>
<script type="text/javascript" src="js/Main.js"></script>
<script type="text/javascript" src="js/ClubList.js"></script>
<script type="text/javascript">
<!--
	function getType(){
		var type = document.form1.type ;
		var action = document.form1.action ;
		action = action.value ;
		var form = document.form1 ;
		if(type.value==2){
			form.action="${applicationScope.path }/Active";
		}else if(type.value==1){
			form.action="${applicationScope.path }/ArticleList";
		}else if(type.value==0){
			form.action="${applicationScope.path }/ClubList";
		}
	}
-->
</script>
</head>
<body>
<div id="Top">
  <div class="Top_all"> <a href="#"><img src="images/LOGO.jpg"/></a>
    <ul id="Top_Nav">
      <li><a href="${applicationScope.path }/Index">首页</a></li>
      <li><a href="${applicationScope.path }/ArticleList">领域</a></li>
      <li><a href="#">发现</a></li>
    </ul>
    <ul id="Second_Menu">
      	<li><a href="${applicationScope.path }/ClubList">发现社团</a><li>
      	<li><a href="#">对味奋青</a><li>
      	<li><a href="${applicationScope.path }/Active">有趣活动</a><li>
      </ul>
    <div id="Search">
      <div class="Search_l"></div>
      <form name="form1" method="post" action="" onsubmit="getType();">
      	<input type="hidden" name="action" value="search" />
        <input type="text" id="Search_Box" name="content" value="搜索社团、文章、活动..."/>
        <img src="images/search_btn.jpg" id="Search_Btn"/>
        <input type="hidden" value="0" id="Search_What" name="type"/>  <!--传送搜索类型参数-->
      </form>
    </div>
    <div id="Search_Option">
    	<p class="Search_Option_Hover"><img src="images/search_hover0.jpg"/>包含<span></span>的社团</p>
    	<p><img src="images/search_hover1.jpg"/>包含<span></span>的帖子</p>
    	<p><img src="images/search_hover2.jpg"/>包含<span></span>的活动</p>
    </div>
    <div id="User_Top">
    <c:choose>
    	<c:when test="${not empty sessionScope.user}">
    	<c:forEach items="${requestScope.login}" var="login">
    		<img src="${login.uphoto}"/><a href="#">${login.uname}</a>
        	<ul id="User_Info_Box">
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}"><img src="images/home.jpg"/>个人主页</a></li>
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}&lx=private"><img src="images/sms.jpg"/>私信</a></li>
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}&lx=edit"><img src="images/control.jpg"/>设置</a></li>
	        	<li><a href="${applicationScope.path }/Logout.jsp"><img src="images/logout.jpg"/>注销</a></li>
        	</ul>
        </c:forEach>
    	</c:when>
   	 	<c:otherwise>
    		<a href="${applicationScope.path }/Entrance.jsp">您还未登录</a>
    	</c:otherwise>
    </c:choose>
    </div>
    <img src="images/help.jpg" id="Help_Btn" title="帮助中心"/> </div>
</div>
<!--头部结束-->
<div class="Page_Top"></div>
<div class="Page_Middle">
  <div class="Page_Left">
    <p class="Page_Title">社团列表</p>
    <div class="Title_Line"></div>
    <div class="Page_Main" style="width:100%;">

    	<div class="Pro_Change">
        	<div class="Join_Btn" style="float:left;">全部<img src="images/tringle_m.jpg"/></div>
            <div id="Club_Style">
            	<a href="${applicationScope.path }/ClubList?action=choose&type=true">实名社团</a>
            	<a href="${applicationScope.path }/ClubList?action=choose&type=false">虚拟社团</a>
            </div>
        </div>
      <div id="Club_List">
      	<!--此标签为一栏社团信息-->
      <c:forEach items="${requestScope.club}" var="club">
         <div class="Club_List_All">
            <div class="Club_List_Info_W">
            <div class="Club_List_Img">
            <span class="Club_Text_Bg">${club.cname }<c:if test="${club.ctype=='实名社团'}"><img src="images/real_small.png" title="已获得线下实名社团认证" /></c:if>
            	<p class="Club_Grade">
            		<span title="成员数量">${club.number }</span>
            		<span title="活跃度">${club.cmark }</span>
            	</p>
            </span>
            	<a href="${applicationScope.path }/Club?cid=${club.cid }"><img src="${club.cphono }" class="Club_Logo" /></a>
            </div>
                <div class="Club_List_Text">
                    <p>　　${club.content }<a href="${applicationScope.path }/Club?cid=${club.cid }">查看主页></a></p>
                    <span>领域：<a href="#">${club.ftype }</a></span><br />
                    <span>标签：<a href="#">${club.ctag }</a></span>
                </div>
            </div>
        </div>
      </c:forEach>
      <c:if test="${empty requestScope.club}">
      	<center>暂无相关社团</center>
      </c:if>
      </div>
    </div>
        <div class="Pages">
        <a href="?type=${requestScope.type}&action=${requestScope.action}&page=1" class="Pages_a">首  页</a>
    	<c:choose>
        	<c:when test="${requestScope.page>1 }">
        		<a href="?type=${requestScope.type}&action=${requestScope.action}&page=${requestScope.page -1 }" class="Pages_a">上一页</a>
        	</c:when>
        	<c:otherwise>
				<a class="Pages_a">上一页</a>        	
        	</c:otherwise>
        </c:choose>
    	<c:forEach items="${requestScope.count}" var="page">
    		<c:choose>
    			<c:when test="${requestScope.page==page.page}">
    				<span class="Pages_Current">${page.page}</span>
    			</c:when>
    			<c:otherwise>
					<a href="?type=${requestScope.type}&action=${requestScope.action}&page=${page.page}" class="Pages_a">${page.page}</a>    			
    			</c:otherwise>
    		</c:choose>
        </c:forEach>
        <c:choose>
        <c:when test="${requestScope.page+1>requestScope.csize}">
        <a class="Pages_a">下一页</a>
        <a href="?type=${requestScope.type}&action=${requestScope.action}&page=${requestScope.csize }" class="Pages_a">末页</a>
        </c:when>
        	<c:otherwise>
        		<a href="?type=${requestScope.type}&action=${requestScope.action}&page=${requestScope.page +1 }" class="Pages_a">下一页</a>
        		<a href="?type=${requestScope.type}&action=${requestScope.action}&page=${requestScope.csize }" class="Pages_a">末页</a>
        	</c:otherwise>
        </c:choose>
    </div>
  </div>
   <div class="Page_Right">
  	<input type="submit" class="Green_Button" value="创建社团" onclick="window.location.href='CreatClub.jsp'"/>
    <div class="Page_Tops">
    	<div class="Page_Tops_Title">
        	<p>社团筛选</p>
        </div>
        <form action="ClubList" method="post">
    	<table width="190">
        	<tr><td height="20"><input type="hidden" name="action" value="seek" /></td></tr>
        	<tr><td width="80" align="right">城市：</td><td><input type="text" name="city"/></td></tr>
        	<tr><td align="right">学校：</td><td><input type="text" name="school"/></td></tr>
        	<tr><td align="right">关键字：</td><td><input type="text" name="keyword"/></td></tr>
        	<tr><td colspan="2"><input type="submit" class="Green_Button_S" value="筛选"/></td></tr>
        	<tr><td height="20"><br /></td></tr>
        </table>
        </form>
    </div>
    <div class="Page_Tops">
    	<div class="Page_Tops_Title">
        	<p>热门社团</p>
        </div>
    	<ul>
        	  <c:forEach items="${requestScope.st}" var="st">
    			<c:choose>
    				<c:when test="${st.pid<4}">
    					<li><span class="Page_Tops_Code1">${st.pid}</span><a href="Club?${st.cid}">${st.cname}</a></li>
    				</c:when>
    				<c:otherwise>
    					<li><span class="Page_Tops_Code2">${st.pid}</span><a href="Club?${st.cid}">${st.cname}</a></li>
    				</c:otherwise>
    			</c:choose>
        	</c:forEach>
    		<c:if test="${empty requestScope.st}">
        		<li><h5>暂无相关社团</h5></li>
        	</c:if>
        </ul>
    </div>
  </div>
</div>
<div class="Page_Bottom"></div>
<!--版权部分-->
<div class="Bottom">
  <p><a href="#"><img src="images/LOGO_gray.jpg" align="left"/></a> <a href="#">奋青首页</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">社团中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">交流圈子</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">活动中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">帮助中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">使用反馈</a>&nbsp;&nbsp;|&nbsp;&nbsp;联系我们：<a href="mailto:scdzwyxst@gmail.com">scdzwyxst@gmail.com</a>&nbsp;&nbsp;<br />
    CopyRight&copy;&nbsp;2012&nbsp;MayDay  All Rights Reserved</p>
</div>
</body>
</html>
